<?php
$pickQuery = mysql_query("SELECT * FROM `users` WHERE (`status`='1') AND (`pick` != 0) AND (`pick` != '') ");
while ($pick = mysql_fetch_array($pickQuery)) {
   $pickAlbQuery = mysql_query("SELECT * FROM `album` WHERE `cddbid` = '".$pick[pick]."' LIMIT 1 ");
   $pickAlb = mysql_fetch_array($pickAlbQuery);
   echo('"'.$pickAlb[title].'" by '.$pickAlb[artist].' is '.$pick[nickname].'\'s pick.<br />');
}

/*

$where = '';
if ($U_[rights] < 3) {
	$where .= "WHERE `status`='2' ";
} else {
	$where .= "WHERE `status`<'3' ";
}

$query = "SELECT * FROM `album` ". $where . "ORDER BY TRIM(LEADING 'the ' FROM LOWER(`artist`)) ASC ";
$result = mysql_query($query) or die(mysql_error());
?>
<table>
<tr><th></th><th>Artist</th><th>Album</th>
<?php
if ($U_[rights] > 2) echo('<th>Status</th><th>Weeks</th><th>Spins</th>');
?>
</tr>
<?php
while($row = mysql_fetch_assoc($result)) { //show all the results from the above query
?>
<tr class="highlighted">
<?php
if ($U_[rights] > 3) {
	?><td><a href="?mode=cdedit&amp;cddbid=<?=$row[cddbid]?>&amp;cat=<?=$cat?>" title="Edit this CD"><img style="border: 0px;" height="16" width="16" title="Edit this CD" alt="edit this CD" src="./themes/<?=$theme?>/img/edit.png" /></a>
	</td><?php
	}
	?><td><a href="?cat=<?=$cat?>&amp;mode=cdview&amp;cddbid=<?=$row[cddbid]?>"><?=$row[artist]?></a></td>
<td><?=$row[title]?></td>
<?php
if ($U_[rights] > 2) {
?><td><?php
	if ($row[status] == 2) echo('new');
	elseif ($row[status] < 2) echo('not in yet');
	else echo('old');
?></td><td><?php
	if ($weeks = get_weeks($row[cddbid])) echo ($weeks . '</td>');
}
?>
<td><?php
if ($U_[rights] > 3) {
	if ($spins = get_spins($row[cddbid], $StatStart, $nowstamp)) echo ($spins);
} 
?></td>
</tr>
<?php
}

*/

?>